package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.PolicyPermissionsExample.E_PERMISSIONS_ID;
import static org.jsola.hr.example.PolicyPermissionsExample.E_PERMISSIONS_TYPE;
import static org.jsola.hr.example.PolicyPermissionsExample.E_POLICY_ID;
import static org.jsola.hr.example.PolicyPermissionsExample.M_PERMISSIONS_ID_MAX;
import static org.jsola.hr.example.PolicyPermissionsExample.M_PERMISSIONS_ID_NOT_NULL;
import static org.jsola.hr.example.PolicyPermissionsExample.M_PERMISSIONS_TYPE_MAX;
import static org.jsola.hr.example.PolicyPermissionsExample.M_PERMISSIONS_TYPE_NOT_NULL;
import static org.jsola.hr.example.PolicyPermissionsExample.M_POLICY_ID_MAX;
import static org.jsola.hr.example.PolicyPermissionsExample.M_POLICY_ID_NOT_NULL;
import static org.jsola.hr.example.PolicyPermissionsExample.N_PERMISSIONS_ID;
import static org.jsola.hr.example.PolicyPermissionsExample.N_PERMISSIONS_TYPE;
import static org.jsola.hr.example.PolicyPermissionsExample.N_POLICY_ID;

/**
 * 政策速递权限
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【政策速递权限】的参数")
@Data
public class PolicyPermissionsUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_POLICY_ID, example = E_POLICY_ID, required = true)
    @NotNull(message = M_POLICY_ID_NOT_NULL)
    @Length(max = 32, message = M_POLICY_ID_MAX)
    private String policyId;

    @ApiModelProperty(notes = N_PERMISSIONS_TYPE, example = E_PERMISSIONS_TYPE, required = true)
    @NotNull(message = M_PERMISSIONS_TYPE_NOT_NULL)
    @Length(max = 32, message = M_PERMISSIONS_TYPE_MAX)
    private String permissionsType;

    @ApiModelProperty(notes = N_PERMISSIONS_ID, example = E_PERMISSIONS_ID, required = true)
    @NotNull(message = M_PERMISSIONS_ID_NOT_NULL)
    @Length(max = 32, message = M_PERMISSIONS_ID_MAX)
    private String permissionsId;


}

